#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int gender, height, weight;
    for (int i = 0; i < n; i++)
    {
        cin >> gender >> height >> weight;
        if (gender == 1)
        { //男生的标准
            if (height == 130)
                cout << "wan mei!";
            else if (height > 130)
                cout << "ni li hai!";
            else if (height < 130)
                cout << "duo chi yu!";
            if (weight == 27)
                cout << " wan mei!";
            else if (weight > 27)
                cout << " shao chi rou!";
            else if (weight < 27)
                cout << " duo chi rou!";
        }
        else
        {
            if (height == 129)
                cout << "wan mei!";
            else if (height > 129)
                cout << "ni li hai!";
            else if (height < 129)
                cout << "duo chi yu!";
            if (weight == 25)
                cout << " wan mei!";
            else if (weight > 25)
                cout << " shao chi rou!";
            else if (weight < 25)
                cout << " duo chi rou!";
        }
        cout << "\n";
    }
    return 0;
}
